/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projetlif13.model;

/**
 *
 * @author theo
 */
public abstract class Board {

    protected int width;
    protected int height;
    protected int depth;
    protected int[][][] boardState;

    public Board(int _width, int _height, int _depth) {
        this.width = _width;
        this.height = _height;
        this.depth = _depth;
        this.boardState = new int[width][height][depth];
    }

    public int[][][] getState() {
        return this.boardState;
    }

    public void setPIDByXY(int x, int y, int id){
        this.boardState[x][y][0] = id;
    }
    public void setPIDByXYZ(int x, int y, int z, int id)
    {
        this.boardState[x][y][z] = id;
    }
    
    public int getPIDByXY(int x, int y) {
        return this.boardState[x][y][0];
    }
    
    public int getPIDByXYZ(int x, int y, int z) {
        return this.boardState[x][y][z];
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }
    
    public int getDepth() {
        return this.depth;
    }
    
    public abstract boolean makeMove(Move m, Player p); //return false si le coup ne peut pas être pris en compte
}
